import DefaultTheme from 'vitepress/theme'
import 'vitepress-theme-demoblock/dist/theme/styles/index.css'
import { useComponents } from './useComponents'
import './style.css'
import Button from '../../../src/components/Button.vue'
import CircleTab from '../../../src/components/CircleTab.vue'
import HzModal from '../../../src/components/HzModal.vue'
import DownloadBtnUrl from '../../../src/components/Download/DownloadBtnUrl.vue'
import Countdown from '../../../src/components/Countdown/index.vue'
import FilterTab from '../../../src/components/FilterTab/index.vue'
import ImgPreview from '../../../src/components/ImgPreview/index.vue'
import '../../../src/styles/index.css'
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css'; // 确保使用最新的 Ant Design Vue 4.x 样式


export default {
  ...DefaultTheme,
  enhanceApp(ctx) {
    DefaultTheme.enhanceApp(ctx)
    useComponents(ctx.app)
    // === 注册组件 ===
    ctx.app.component(Button.name, Button)
    ctx.app.component(CircleTab.name, CircleTab)
    ctx.app.component(HzModal.name, HzModal)
    ctx.app.component(DownloadBtnUrl.name, DownloadBtnUrl)
    ctx.app.component(ImgPreview.name, ImgPreview)
    ctx.app.component(Countdown.name, Countdown)
    ctx.app.component(FilterTab.name, FilterTab)
    ctx.app.use(Antd)
  }
}
